﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;

namespace UIPrototyper
{
    public class ControlFactory
    {
        public ISelectable CreateControl(ControlType pType)
        {
            switch (pType)
            {
                case ControlType.Button:
                    CustomButton btn = new CustomButton();
                    btn.Width = 75;
                    btn.Height = 23;
                    btn.Content = "Botão";
                    return btn;

                case ControlType.ComboBox:
                    CustomComboBox cob = new CustomComboBox();
                    cob.Width = 121;
                    cob.Height = 21;
                    return cob;

                //case ControlType.GroupBox:
                //    CustomGroupBox gpb = new CustomGroupBox();
                //    gpb.Width = 200;
                //    gpb.Height = 100;
                //    gpb.Header = "GroupBox";
                //    return gpb;

                case ControlType.Image:
                    CustomImage img = new CustomImage();
                    img.Width = 200;
                    img.Height = 150;
                    return img;

                case ControlType.Label:
                    CustomLabel lbl = new CustomLabel();
                    lbl.Width = 40;
                    lbl.Height = 23;
                    lbl.Content = "Label";
                    return lbl;

                case ControlType.ListBox:
                    CustomListBox ltb = new CustomListBox();
                    ltb.Width = 120;
                    ltb.Height = 100;
                    return ltb;

                case ControlType.TextBox:
                    CustomTextBox ttb = new CustomTextBox();
                    ttb.Width = 120;
                    ttb.Height = 21;
                    ttb.Text = "TextBox";
                    return ttb;
            }

            return null;
        }
    }
}
